import { BaseItemNormal } from "./BaseItemNormal";
import { SkillInfo } from "../../../model/SkillInfo";
import { TSkill } from "../../../../../Message/Db/Tables/TSkill";
//class BaseSkillItem
    
    export  class BaseSkillItem extends BaseItemNormal
    {
        constructor()
        {
            super();
            return;
        }

        public get skillInfo(): SkillInfo
        {
            return this._skillInfo;
        }

        public set skillInfo(arg1: SkillInfo)
        {
            this._skillInfo = arg1;
            if (this._skillInfo) 
            {
                this.skill = this._skillInfo.tSkill;
            }
            else 
            {
                this.skill = null;
            }
            return;
        }

        public get skill(): TSkill
        {
            return this._skill;
        }

        public set skill(arg1: TSkill)
        {
            this._skill = arg1;
            if (this._skillInfo) 
            {
                this._skillInfo.tSkill = this._skill;
            }
            else 
            {
                this._skillInfo = new SkillInfo();
                this._skillInfo.tSkill = this._skill;
            }
            if (this._skill) 
            {
                source = this._skill.skillIcon.toString() + ".jpg";
            }
            else 
            {
                source = null;
            }
            return;
        }

        public /* override */ get toolTipData()
        {
            if (this._skillInfo) 
            {
                return this._skillInfo.getShortToolTips();
            }
            return "";
        }

        /* internal */ /* var */_skillInfo: SkillInfo;

        /* internal */ /* var */_skill: TSkill;
    }
